package com.hjw.oop;

/**
 *游客类包含游客的信息
 * 类的定义规则：
 *  权限修饰符 修饰符 class 类名{
 *
 *  成员变量的定义规则：
 *      访问修饰符 修饰符 数据类型 属性名 [ = 属性值];
 *
 * 方法的定义规则：
 *      访问修饰符 修饰符 返回类型 方法名(参数列表){
 *
 *      }
 *  }
 * @author hjwStrart
 * @create 2022-01-07 9:40
 */
public class Jourist {

    private String name ; //姓名
    private String gender; //性别
    private Integer age;  //年龄
    private String location;  //籍贯
    private String identify; // 身份号

//    无参构造
    public Jourist() {
    }
    public Jourist(String name, String gender, Integer age, String location, String identify) {
        this.name = name;
        this.gender = gender;
        this.age = age;
        this.location = location;
        this.identify = identify;
    }

//    getter/setter方法
    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getGender() {
        return gender;
    }

    public void setGender(String gender) {
        this.gender = gender;
    }

    public Integer getAge() {
        return age;
    }

    public void setAge(Integer age) {
        this.age = age;
    }

    public String getLocation() {
        return location;
    }

    public void setLocation(String location) {
        this.location = location;
    }

    public String getIdentify() {
        return identify;
    }

    public void setIdentify(String identify) {
        this.identify = identify;
    }

    /**
     * 重写的toString方法
      * @return
     */
    @Override
    public String toString() {
        return "Jourist{" +
                "name='" + name + '\'' +
                ", gender='" + gender + '\'' +
                ", age=" + age +
                ", location='" + location + '\'' +
                ", identify='" + identify + '\'' +
                '}';
    }
}
